From: Ian Jackson Date: Mon, 3 Dec 2018 12:03:48 +0000 (+0000) Subject: docs/parse-support-md: pandoc2html_inline: print failing json X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~2782 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e6831df288cae0f9ebe0e4b8a6bfd0cb5350cfcf;p=xen.git docs/parse-support-md: pandoc2html_inline: print failing json If our run of pandoc to convert pieces of markup in our hand, into html, fails, print the json that was rejected. No change in non-error cases. Signed-off-by: Ian Jackson Acked-by: Juergen Gross --- diff --git a/docs/parse-support-md b/docs/parse-support-md index e2d0187dd1..a8f216f131 100755 --- a/docs/parse-support-md +++ b/docs/parse-support-md @@ -247,10 +247,11 @@ sub pandoc2html_inline ($) { my ($content) = @_; my $json_fh = IO::File::new_tmpfile or die $!; - print $json_fh to_json([ - { unMeta => { } }, - [{ t => 'Para', c => $content }], - ]) or die $!; + my $j = to_json([ + { unMeta => { } }, + [{ t => 'Para', c => $content }], + ]) or die $!; + print $json_fh $j; flush $json_fh or die $!; seek $json_fh,0,0 or die $!; @@ -270,7 +271,7 @@ sub pandoc2html_inline ($) { open STDIN, '<&', $json_fh or die $!; system 'json_pp'; }; - die "\n $? $!"; + die "$j \n $? $!"; } $html =~ s{^\}{} or die "$html ?";